Added tests, doc strings