Factored service out of controller, moved things a little bit around