Merge pull request #43 from Magenic/master

Merging into my local fork.
Fixing issue #166
Fixing issue #163
Merge pull request #167 from jwendl/master

Fixing issues.