Add some pseudo type annonations to the function definitions in editor.js for readability purposes. Also add a simple build script for convenience.