update for pull request and merge back to master

Updated files, removed unnecessary code and added code from class.