Add main functionality to the program