Refactored time structure.
Added sockets.