Added error code. Moved time to main object.