Removed queryController (ie moved functions to /lib)
Working on resultController