- Removed no longer needed $log
- Ensures the filter and directive are minsafe.
- Cleaned up some basic jshint issues.