Changes to allow module loading on client and server