Split main into multible files