TODO cleanup and references