Fix models to be more dynamic. Reviewed Cris's implementation for ideas and code.