Added adaptive timescaling and associated variables