Add first pass of checkstyle, fix checkstyle errors and warnings. Also fix the encoding properties