cleanups, added comments