Neaten up code