Cleaning

cleaned up the project. Removed redundant code. added comments where needed