Moves creation group logic to a context object