beginning to compile all the imported modules
refactoring sweet API
recursively flattening modules