Improve code climate score and tests.