Port enml library from javascript (enml.js)