Clean aliases and add extract function