Improve function signature parsing