Refactors mbParseUrl to allow for use of $component param
Refactors and adds tests