Javascript scaffolding