Fix module definition and load sequencing