First implementation of expand/contract. Slightly rough.