changed service to use provider so it can be injected into a .config block for use with routing.