Added possibility to print output of chain on the form readable by Johnny and Gustavs program. Also modularized main module to adapt this change.