Updated tests and removed as_unicode() compat helper
Python 3 cleanup