Re factored service. Service can now re-establish connection if connection is lost.