Updated doc & fixed $apply problems