Add pip requirements file and optimize imports

- Enable installation of python dependencies via pip install.  
- Optimize imports (remove unused imports and organize via PEP8).