Some fixes to module system. Some things where running twice.