Neatened up chaining code.