Added files to base, DEBUG flag to templates.
Merged sharad's change.