Refactored Route class into a library and renamed class MapRoute.
Depends on Q library rather than Angular's $q service.