restructure, and add compiled module scope
add closure class for lazy evaluation