Bizarre meanderings into structured JavaScript for in-browser games