Code cleanup
code cleanup
Fix print function to correctly print column-first format