Fixing shims

Added shim for `trim` from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim

Also, using `indexOf` shim everywhere
Being available for all in the service, not only in scope of `this.$get`