Add the tests scripts
Fix the runtime errors