rearrange libs and tests, added hard factory