refactor createModel to work with or without design
rewrite, to spilt functionality into layouts and models