Consistent variable naming
Fix indentation
Drop extra line
Do not clash with builtin dir
Remove not used vars
Drop not used javascript templates processing
This example is not really valid now