Refactor printlist