Final Changes

Added all comments and checked code functionality