better module definition and less-middleware fix