Bug fixes, ALL tests pass, main works.