Added unfolding and some changes to loeb