Refactored and renamed generator.js to OO-model, created Backend singleton instance. Cleaned comments.