Module context

Do not review yet, I'm expecting failures.