Added more endpoints and test cases as well.