Minor bug fixes
Culling of old code, documentation updating