Finished flipping demo. Added buttons and improved diagonal flipping algorithm.