Refractoring into apps