Final commit following more tests to remove bugs...