added Time class, some docstrings