Minor cosmetic changes

Cleaned up unnecessary variables and functions.
Updated function to Delay_yms.