cleanup Model package
fixing minor bugs found during execution