Solution for the typeof problem
Whitespace cleanup