Add template to default config parameters
PSR-2 pass
Nuke type="text/javascript"
Move asset loading to own function
Only execute in frontend
Add some PHPDoc