changes in backend

restructured main.js, altered Buffer JSON serialization, added append,
appendHTML and appendJSON methods to prototype of JavaScriptObject,
fixed regular expressions, created active directory