Finally finished this assignment

Made changes to make sure all values are valid and made sure everything
works.