Fixes Issue #230
Lots of work on various things