cleanup in three.js libraries