Split class into funcitons