Added get() method and cleaned up some KeyError madness.