Added assignment logic and resolveSimpleIds.
Added global module declaration.
Stuff happens