Hg 320

I need to have type of a gallery to know where to get the data from
I will work on cleaning up the code tomorrow and to add more comments
I have also have to fix links with ?file in them as this brakes here

I am putting it here for an initial PR CR.

Thanks!