A couple of definitions, and a little more refactorign.