Start to minimise dependency on Lwt

Signed-off-by: David Scott <dave.scott@citrix.com>