Added collapse and expand functionality