Explicitly sort lists when rendering

This means it doesn’t matter what order we keep the actual data in.

Closes #14.