Consolidate code

Description

Create functions where possible
Optimize, clean, and comment code

Assignee

Ryan Hayashino

Reporter

Ryan Hayashino