Fixes a lot of bugs throughout, needs testing
Manual merge
Adds major fixes throughout