documentation and code improvements

added documentation to methods.
changed query list format.
moved the classes to different files