Mainly Code cleanup

-deleting unnecessary functions, variables
- default query on page load