Added tests, added bind helper function