Move maximum code to lib/modules