Better KDF/updated API/refactoring