removed unreachable code paths in prime script, and storing apps in /opt