Fixed a shit load of bugs holy fuck