Converted to use ejs templating engine