refactored app_pkg
corrected install script and added install_tests script