Bugfix
Added some printing functionality and a few bug fixes