Last test mostly worked. Minor fixes