Minor core tweaks and fixes.

Set FormPages to use the new templating system.
Updated the PHTML template parser to work with the new tempalting system.
Tweaks to the hook system; it now supports executing specific hooks' attached events individually