Learning model (main loop) in its own function.
Printing into own functions.