Move functions to I1Application to reduce duplicate code