Add methods selection support to extract_interface.
Extract several functions from the main function.
Move extract_interface to reshaper.extract module.

Also add unittest for it.