more refactoring and start fixing timer stopping