Fourth Commit. Cleaning up of redundant functions