Move print functions into textui module
Update grid and main to use text ui module