Adding link layer

Handles retries
added todo
wired in link layer
cleaned up some warnings