Changed Timer to Executors

Removed timer to executors and implemented some changes to avoid
conflicts among threads