Refactor of prints to DRY