Added checkstyle. Added better logging handling.