Added $state to service to change states