cleanup, added comments