Removed var.sml
Simplified flattening module to a series of operations that move between term languages.