Sanitize files and fix external interface.