start tests
lots of fixes, adding tests