* use to_text instead of to_native * cleaned up some imports and other pyflakisms * fix missing lib messages