extended start script clean up and fixes for install/upgrade