Initial version of type.js + tests