refactor model structure for freemarker template