Refactor functionlist.py insert instruction