Broke up giant function