Refactor bootstraping of a Python library.