Move main function