Fixed up to be a little less messy.