refactored some functions out of the countdown component

settings are now in the state instead of opts