Add gitlab CI & tiny cleanup
Went through the code in my last PR and noticed that I had some redundant code that is now removed. Sorry for that. Also seems like I had a CI on this fork that I forgot some PR. Let me know if you want me to split these PRs up.