Finish a lot more cleanup

This formats everything properly. The code itself still needs more cleanup