Added type dropdown in query module
Clean code and documentation
Merge conflicts solved