Made a bit of a branching mess with this.