Added query system and a parsing system.
Very rough draft, I wouldn't commit it but I have to 
work on this from a different computer.