JS: remove button registry; make ButtonFactory less complex