Removed the redundant "import sys" statements and adapted the tests