Added checkstyle and refactored to pass the verify phase