Added time and did some fixes