Add checkstyle, refactoring.