cleaned up commented code and removed extraneous code