server-side logic complete, though client-side keeps glitching...