Implement unfolding
Move expander to pipe-core