Misc cleanup and commenting