Remove redundant casts, add @Deprecated to deprecated functions, add a few missing @Override annotations, and include warnings and deprecations in compiler options.