Removed unused code and amended tests for 100% code coverage