Refactor control creations into separate functions