Moved mesh tools to module lib, and updated sample code with refactored function names.