miscellaneous fixes
Mirror unit tests