Removed py2 code (still in legacy branch).