added jshint and jsbeautifier config
major refactoring, closes #1 and #2 and makes it possible to properly clean up filesystem in external controller