Removed unecessary variables, added test cases