Add main functions and sample configuration