Completely rewrote the entire mod from scratch. Joys.