Removed some unnecessary code and added some comments to the new functions