Refactor code for efficiency and with improved style.
Remove uneccessary whitespace.
Merge pull request #1 from cjlwired/master

Pull Request --- Code Improvements