Initial module support

This doesn't actually work completely, but the basic parsing and context tracking is working
Merge branch 'feature/modules'