I think we can clean this code up a wee bit too.