Implemented Query Builder
Code readability tweaks