Rename output column and minimal refactor