Added handshake code
Added ad interface