Some more work on modules (not finished yet)