move rendering logic to mat class
move responsibilty for rendering actions into mat class
rename index.js to routine.js