Reverted move to header-only, fixed unit tests