numerous design and bug fixes

Basically, this actually is fully working for the first time as of this
commit