Dev2.1

Fixes for issues 45, 46 and 48