Initial draft of version 3

First draft of version 3.

Fixes #176 
Fixes #177 
Fixes #152