Refactor database scripts to adhere to PEP8