more cleanups and comments