Adding main function.