Refactored codebase of dockinstall/install.py

- Refactored the codebase of dockinstall/install.py
- Fixed pep8 and flake8 warnings and errors