Cleanup setFunctionDefinitionAttributes.

Use more specific type, update comments and name style.