Lab2: Fized part4 to work with different cases and symbols, added test cases, cleaned up code, added comments