changed names of intermediate modules to avoid clashes
added a type-level description of the format