Refactors a handle record to be a dict instead of an array