codeq.io code cleanup

I've tidied up all by the setup and testing according to the codeq coding standards. I actually like most of their requirements I also did a few cleanups of my own :)