enabled use as module; other improvements