Reorganizing code a bit.