Fix compilation problems and checkstyle