Cleaned up a number of warnings and fixed some imports and final
method/class signatures.