Improve serialisation of character locations