changed structure to separate modules for types and interfaces