Use RLP constant instead of magic number

Using a constant for 0xB7 as an offset for items longer than length 55.
Using a constant for 0xF7 as an offset for a list with a payload longer than length 55.
This should make the code a little easier to understand.

It looks like there are a lot of changes, but basically the only changes are the two constants and some formatting to keep the code nice. Has been tested and application still works fine.