Cleaning up vision code