Prettified the code a bit.