Added rng passing through to all parts. Added file logging.