minor cleanup, added comments