Refactor stagr