NEXUS-7608: Refactor

Moved into separate package, removed context, fleshed out
ruby to make room for other.