Several changes:
1. added support for Modules
2. changed the way we handle var and assignments order.