refactoring timer to cleaner solution.
refactoring and updating array extensions