Re-write of Timming module, cleaning up main.