Remove unnecessary casts
Remove unnecessary semicolons
Add missing @Override annotations
Remove dead code
Merge pull request #1536 from scop/cleanups

Various cleanups