DRY'd up code and made num workouts dynamic.