Integrated test mode and minor changes.