Some basic cleanup

I added a few spaces, got rid of all warnings except for one caused by a macro not always using the variable it's given, and minimized glob imports.