Modified for EJS Template and ORM Layer