Refactor : moved cheap-templates.js to lib. Added documentation