Max concurrency

This builds on top of #15 and adds a max_concurrency setting.