Create main exec file, some of the main functions