Java 7 idioms + some minor tidying