Fix a buttload of checkstyle and PMD related things (spacing, unused variables, magic numbers, etc.)