Implemented basic model generator code.