Added tests and more