Reworked template restriction system.
Fixed spelling error.
WIP