Added module support; a few minor fixes/tweaks