Alphabetic sorting of data

So everything has a consistent ordering.

Models will be sorted alphabetically, rather than by any sort of inheritance order, so anything using the templates will need to be able to deal with that. (I suggest splitting models into per-class files.)