Prettied up code a bit