Moved latest status code to its own function.