Cleanup and fix the use of permenant box ids.