Needed for Self Tests
Fixes #38
Fixes #40
Fixes #41
Fixes #43
Fixes #44
Fixes #45
Some cleanup work
Merge pull request #46 from DanielJMaher/bug_fixes

Bug fixes