Taking advantage of more java.nio features, and java 7/8 features.
General fixes, and bug squashing.