I would like to strongly second how much of a mess this code is. It would probably need a complete rework hahaha