Added some description to my functions and removed an unused variable