Move tests out of the library folders to one common tests folder.
Changes on some of the tests. Additional fixes and changes.