added some history functionality
New function to print to file

And comments
Fixing conflicts, added comments + print method