Adding executor service for threads and remove unnecessary threads