Recv Cleanup

Moved a large chunk of the "recv" function into various helper files.