Moved key abstractions out of package object to allow java interop