Implement folding and outline