Remove some dead code and prettify slightly

Nothing should have changed in the way it works, just noticed some cosmetic things.