Refactor parseKey method's naming of things and checking for errors