refactoring model out of xml (test still broken)