Turn generator into lib and use it in update.dart