Changes to decrese the diffs with PR #56.
* Formating changes
* Renamed injected log to $log
* Replaced apply function with inlined anonymus