finished api cleanup