Fixed bug in module loader, improved renderloop