added README, removed unused functions, added comments