I finally gave up after spending 2 hours in meaningless chat with ChatGPT (which offers nice solutions, but nothing that actually works). I started searching on Google and ended up with a structure similar to Delve's. Worked in the first shot, and I am satisfied with the result.