Revert "Revert "various improvements / fixes""
Merge pull request #4 from mralexgray/revert-3-revert-1-fixes

Revert "Revert "various improvements / fixes""