Cleaning up deprecation warnings

Also setting 1.6 as the target Java version
12 files changed