Fixes #59, #50, #44 and #32
Merge pull request #69 from pkuczynski/issue_59

Fixes #59, #50, #44 and #32