Additional cleanup on refactor

1. Check for empty column headers, which fixes the test failures
2. Whitespace cleanup