Fixed this up and squashed the commits.