Support an arbitrary number of dividers

Resolves #4 

/cc @robrix
Turns out I had the right approach but made a mistake the first time. :relaxed: