Clean up some sloppy code and comments