move template to examples/templates/application
add library template