Utilised Java 8 (and 7) features to tidy up code. Removed unnecessary types. Contributed by Graham Russell (graham at ham1.co.uk). Part 2/8 of github pr #255