Add main file and some other functions.