Added "global $mvid_config" to the start of the file, so it works when til file is called from a function.