Optimized chunk loader

Fixes #1486 
Why all the module changes.