New unit testing suit using behave and several smaller fixes

Also fixes #84