Added the new main functions.