Added tests and testing script