Merging the first part of the hop code

Signed-off-by: Joe Buck <jbbuck@gmail.com>