Adds the option to create a model for a single level.
Combines all model fitting into a single loop.
Adds some documentation.