Refs #1 - Clean up key handling a bit.