Added tests to increase coverage. Removed set but unused variables.