Reworking the module

Use Java7 constructs, simplification, javadoc