added missing imports and headers
ignore *.pyc files
fix functional tests