Reverted most changes, retain 2.9.5 compatibility