Bringing in new build from scuttle-java (just a few refactorings)