More convenient convert_state.py
Clean up
Remove unused import
Sort beam-search results