Clean up warnings, deprecated code

Several cleanups and fixes:

- Clean up a lot of deprecation warnings
- Use new index mappings in packed preference data
- Build on Java 8