Installer refactoring

WIP