Switched over to command object so it will be easy to support fail over.