tidy all module model and tablegateway