DONE: Use constants for the result codes.
WIP: Add a large set of unit tests for the "read" functions.
FIXED: When "read" fails, send an error instead of panic.