moved IdxKey and OffKey to dex module so that any other modules can reuse those as fuctors