Cleaning up some formatting, debug lines etc