Organized code a bit.