A few cleanups 

I've tested these changes on Ubuntu LTS  however there shouldn't be any issues