Small refactoring done; generator implementation continued