Cleaned up and added test cases