added space after function keyword
cleaned up redundant code
Merge pull request #6 from saurshaz/wip

Wip