Frontend code for TotemMash