whitespace around methods and typecasting fixes