Template logic rewritten.
Angular.js implementation started.