Added module and module configuration loader, fixed some issues