Use named chunks for example js files
Adds dynamic simple example

Needs more doc
Use utils methods instead of globally defined ones