EPIC COMMIT: app_ugrade(), app_info() and app_install refactoring + fixes