added comments and removed a few lines