Fixes issue #1
Fixes issue #7
Fixes issue #8