Looks cool. Couple of pointers:
- Use a tool like EsLint to lint your code. It will make it more readable and cleaner than it is right now. Maybe integrate your editor with Eslint and it will guide you to write cleaner code.
- You can use underscore templating to inject variables in the template and it will be much more cleaner and maintainable. http://underscorejs.org/