Cleaned backend custom query up and made consise,
Also updated comments to be accurate
Renamed and merged util files to something sane
Updated testcases to be relevant and match new names