Some cleanup in api:s.