Refactor for parameter use and `pep8` compliance

* __doc__ string
* Parameters instead of hardcoded credentials
* Split into functions