added setup, it is now installable

 Please enter the commit message for your changes. Lines starting
refactoring of queries to a more sane and less bulky architecture
to bo tested