Added tests (finally!)