Latest changes ready to merg. Compliles, but not yet complete