Fix indentation. Fix minor bug. Refactor a bit for readability and intuitiveness.
Merge pull request #159 from xnakos/master

Fix indentation. Fix minor bug. Refactor a bit for readability.