misc cleanup and reformatting