added notes
moved several queries to constants
moved flags to constants.go