Overhauled how flip detection/clicking is done. Added log rotation.