Neaten code and reduce whitespace from output