Parameterize trystack classes, remove old globals from JSON, style cleanup