Refactor and ultimately fix the printing