Created AdminProtect. Refactored some code.

Signed-off-by: Zyk <zyk6870@gmail.com>