Add explanations for the hard-coded get_previous_version function

Also wrap the error in an Exception() when previous version is undefined
Use tuples rather than lists