JSHinted and cleaned up rx buffer