replacing messy inline templates by Emblem.js