Mostly working, just need to find one bug and maybe get rid of the whole short thing