refactor handling of extension list

Change-Id: I922c17523197497139da92d8be33dba10349a369
Merge "refactor handling of extension list"