A number of major changes made and new tests added.