Updated test.py
Added future imports for Python 3 compatibility
Extracted utils module