Message processing

Attempted to give names to nameless messages, swapped section 4 and 5. This needs checking to ensure I didn't break the logic. Very necessary though, as the other was quite hard to understand.