Added support for multiple channels, added LBFGS