Added button for extended master key
also added in some work to cache pubilc keys