Major code clean up removed redundant code from the definition method and completed the commenting of all methods