Nitpicking the code

Minor changes here and there to remove warnings and make code cleaner and more uniform.
Nice catch, this is pretty subtle. This whole class is one of the oldest in the library and could definitely use some tests and refactoring. Thanks for diving in.