Prettied up the code a bit.