Move code around for better organization.