Make the compiler more strict.

Make warnings errors, fix some silly generics and cast errors & wrap
some long lines.