Minor JavaScript optimization

Always use cached jQuery element.
Extract callback to function.
Package updates

Remove debugbar from application and composer.json.
Edit composer.json to reflect project information and require specific
package versions for all dependencies.
Add composer.lock to repository to lock in dependency versions.