Improved code with checkstyle.