Tidied these things up a little bit.