initial Java 7 conversion of proejct + some minor tidying