Correcting script and tests