Clean up PHP notices, add hooks to area template files.