ensured applications install correctly with local-install function
cleaned up install function