Some fixes and added toString.