bug #659 - add templates and move scripts, styles to diferent files

https://gist.github.com/rgatkowski/b08d04ccecadf51c4248