Add `self_refresh` origin configuration setting
Refactor NewOrigin() function