Time formatting function inserted. Working for the most part.