Wrote basic cup synchronization functionality. Untested and unfinished.