Cleaned up function definition visitor