Refocused the changes by adding appropriate tests and removing unnecessary code.