Improve imenu

Support named function and refactoring