some cleanup, use WaitGroup over channel ugliness