jim_begin() cleans up the state. jim_end() closes dangling scopes.
jim_begin() cleans up the state. jim_end() closes dangling scopes.