improve style

brackets in if statements only if required.
always use single quotes.
always use spaces when comparing.
style

whitespaces