added an editorconfig file
split common.js into separate files. closes #7