model refactor
Refactor, bugfix Model