Updated for refactoring in EJS