General cleanup of API and tests without functionality change