Added an executor service to reduce code verbosity.