Various fixes and refactored install_* to install_package