Added a test driver and moved everything related to testing in that script