Added unit tests and linted the code.