add default main and unbind + tests. closes #81, #82