correct incorrect references to object variable
remove some whitespace