Some more cleanup and reformatting