removed unused things, added comments