Started rewriting the javascript hex lib