Converted autobhan connection factory into an AngularJS service