cleanup and reformatting