Better handling of functions and files.