Improved module route generation