Fixed dumb loop condition
Added board rotate functionality