Code Refactor

1. Fix Code issues introduced by other enhancement
2. Fix Column test cases.
3. Improve performance.