Added comments and removed uneccessary code.