Add java.util.logging with major code refactoring