Added the timeout timer and removed unneded imports