Implemented quality adjustment in Bonus.js and Trap.js