3AM end of code sesh. Slightly modified and working, thanks to @rafkhan. I'm sleepy
Testing develop branch
Merge branch 'develop'
Removed develop
Delete non working file
Program doesn't crash on query fail