Added online and offline modes.