Added from-file function.
Fixed syntax errors.