Extract generateInternal
Support ES6 Template Literals

Close #201