Added Time module and some minor fixes