Made functions have protocols. Will have to modify file format later.