Refactor spawn rules