Add multi-term support (in progress)