Revert "Clean up protected apps code (1/2)"

This reverts commit fc5def0c4ddd189a4bc1a7348ea0c9c71bef90ca.
Fix missing imports because i derped