refactor, extract meteor-code for easy removal