added a config.php.sample, and moduled functions