more cleanups and formatting