Libefi

I have been sitting on these commits in my local branch for a while. They are long overdue for going upstream.