Yet another module definition optimizer