style fixes (whitespace, has_key, etc)