Refactor of ethernet send & receive functions