Cured a few more bugs with the Model and Laymode class