added modules.c
preparing to move module init/activation code to modules.c