Replaced module system with regions. Did a bunch o' refactoring