added main and sub templates for php
changes template engine to jade for nodejs