Various improvements, testing with Gain=25, 200mA version