Initial refactoring based on omnibus installer.