Move model discovery to Model class.