Cleaned imports up.
Rewrote RequestEntity - the previous design suffered from a number of fatal flaws, such as text entities whose charset failed to be updated.