Completed Part 5

Tricky one! Serious debug console spam ATM but that'll be fixed later I
hope.