Added tests and new scripts