Completed initial implementation of TIC protocol

Fixed TLS implementation
Added test code