Breaking code out for cleanliness