Refactoring and cleaning.

Split out the code to flip site spins and change tile colors into a separate
function. Added guards to print statements.