Indent fixes
Simplifying expressions
Merge pull request #312 from WebSpider/dev-code_cleanup

Code cleanup