Added support for hidden apps (bug 1019249, 1019251)

they're pretty repetitive. But with slight variations. Generalizing to make it less DRY would likely make it a lot less readable.