kinda working again. I'll probably keep refactoring and breaking things though :(