Add listener and clean up Import Branch code.