Cleanup, code that wasn't mine (example code) was removed, and a worst-case is computed.