Various changes, and add web-mode for web template files