Added support for non-gui learning