Clears screen after before printing each board
Adds main
Corrects stdin buffering for execution in terminal