[fx] use classes instead of singleton objects