Add main functions.