Fix compilation and checkstyle errors