got standalone working with grammar separated from its use. required some hairy changes as browser load order has to be considered. details in a comment in the html file itself