Bugfixes based on tutorial testing, and improved output