Refactor util/deg

- [ ] Make non-instantiable
- [ ] Rename deg function to generate
- [ ] Fix logic on function.