Split up one big function onto small ones.