Update traits.js

Added comments