Removed unneeded casts

Discovered by Eclipse
Added missing @Override annotations

Discovered by Eclipse
Corrected indentation and removed trailing whitespace

Discovered by Eclipse