Split ES6 Template logic from main functionality.