Improved code coverage
Added unit test
Code formatting