Make some code more core-ready

Yay for preparing to move to the core
Add file_delete server mech, security features

Yay for basic security