Refactor: Move code from install.py to separate class