Coded by Rosemary Hogarth and open-sourced on GitHub.