refactor some code to expose column numbers more and make diagnostic printing slightl...