Added support for Learning...
Cleanup function for learning thread, more parameters through dict
Callbacks for learning control