And refactor some of the older code to simplify it Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>