Refactor, goroutines, mutex