Format and other minor fixes