Added generic mul function and tuning.h.