datadecl refactor
begin lib