Fixed a number of standing issues

Fixes issue #29
Fixes issue #20
Fixes issue #12