Refactorize generator & add a basic recorder.js example