type.js improvement
type.js cleaning