Better pointer offset calculation
Use let where possible in generation
Merge branch 'generator' into swift