This code is still pretty wierd. I haven't cleaned it up because I still have to change it a ton for the client prediction logic, so it's messy for now.