Add support for submoduled classes (DO NOT MERGE)