Reworked to be used from within a meteor client