Refactor feature setup to use global feature func