Neatened code a tad