Optimize prerequisites and protect

Closes #668