Modify memoryBytesToString to use pattern matching, lazy contants, and displays ranges up front.

- Modify memoryBytesToString to use pattern matching, lazy contants, and displays ranges up front.