Added the ability to trim leading and trailing zeros to getPulseWidth. Also made an independent utility class to hold commonly used functions