diff --git a/src/rde_common.c b/src/bej_common.c
similarity index 64%
rename from src/rde_common.c
rename to src/bej_common.c
index 258a543..1d3be07 100644
--- a/src/rde_common.c
+++ b/src/bej_common.c
@@ -1,6 +1,6 @@
-#include "rde_common.h"
+#include "bej_common.h"
 
-uint64_t rdeGetUnsignedInteger(const uint8_t* bytes, uint8_t numOfBytes)
+uint64_t bejGetUnsignedInteger(const uint8_t* bytes, uint8_t numOfBytes)
 {
     uint64_t num = 0;
     for (uint8_t i = 0; i < numOfBytes; ++i)
@@ -10,15 +10,15 @@
     return num;
 }
 
-uint64_t rdeGetNnint(const uint8_t* nnint)
+uint64_t bejGetNnint(const uint8_t* nnint)
 {
     // In nnint, first byte indicate how many bytes are there. Remaining bytes
     // represent the value in little-endian format.
     const uint8_t size = *nnint;
-    return rdeGetUnsignedInteger(nnint + sizeof(uint8_t), size);
+    return bejGetUnsignedInteger(nnint + sizeof(uint8_t), size);
 }
 
-uint8_t rdeGetNnintSize(const uint8_t* nnint)
+uint8_t bejGetNnintSize(const uint8_t* nnint)
 {
     // In nnint, first byte indicate how many bytes are there.
     return *nnint + sizeof(uint8_t);
diff --git a/src/bej_decoder_core.c b/src/bej_decoder_core.c
index 877d8e4..b1688a9 100644
--- a/src/bej_decoder_core.c
+++ b/src/bej_decoder_core.c
@@ -58,7 +58,7 @@
     {
         return 0;
     }
-    uint64_t value = rdeGetUnsignedInteger(bytes, numOfBytes);
+    uint64_t value = bejGetUnsignedInteger(bytes, numOfBytes);
     uint8_t bitsInVal = numOfBytes * 8;
     // Since numOfBytes > 0, bitsInVal is non negative.
     uint64_t mask = (uint64_t)1 << (uint8_t)(bitsInVal - 1);
@@ -112,11 +112,11 @@
     // segment.
     bejGetLocalBejSFLVOffsets(params->state.encodedSubStream, &localOffset);
     struct BejSFLV* sflv = &params->sflv;
-    const uint32_t valueLength = (uint32_t)(rdeGetNnint(
+    const uint32_t valueLength = (uint32_t)(bejGetNnint(
         params->state.encodedSubStream + localOffset.valueLenNnintOffset));
     // Sequence number itself should be 16bits. Using 32bits for
     // [sequence_number + schema_type].
-    uint32_t tupleS = (uint32_t)(rdeGetNnint(params->state.encodedSubStream));
+    uint32_t tupleS = (uint32_t)(bejGetNnint(params->state.encodedSubStream));
     sflv->tupleS.schema = (uint8_t)(tupleS & DICTIONARY_TYPE_MASK);
     sflv->tupleS.sequenceNumber =
         (uint16_t)((tupleS & (~DICTIONARY_TYPE_MASK)) >>
@@ -147,7 +147,7 @@
     // being decoded.
     bejGetLocalBejSFLVOffsets(params->state.encodedSubStream, &localOffset);
     return params->state.encodedStreamOffset + localOffset.valueOffset +
-           rdeGetNnintSize(params->sflv.value);
+           bejGetNnintSize(params->sflv.value);
 }
 
 /**
@@ -344,7 +344,7 @@
     RETURN_IF_CALLBACK_IERROR(params->decodedCallback->callbackSetStart,
                               propName, params->callbacksDataPtr);
 
-    uint64_t elements = rdeGetNnint(params->sflv.value);
+    uint64_t elements = bejGetNnint(params->sflv.value);
     // If its an empty set, we are done here.
     if (elements == 0)
     {
@@ -403,7 +403,7 @@
     RETURN_IF_CALLBACK_IERROR(params->decodedCallback->callbackArrayStart,
                               propName, params->callbacksDataPtr);
 
-    uint64_t elements = rdeGetNnint(params->sflv.value);
+    uint64_t elements = bejGetNnint(params->sflv.value);
     // If its an empty array, we are done here.
     if (elements == 0)
     {
@@ -515,7 +515,7 @@
     {
         // Get the string for enum value.
         uint16_t enumValueSequenceN =
-            (uint16_t)(rdeGetNnint(params->sflv.value));
+            (uint16_t)(bejGetNnint(params->sflv.value));
         const struct BejDictionaryProperty* enumValueProp;
         RETURN_IF_IERROR(
             bejDictGetProperty(dictionary, prop->childPointerOffset,
@@ -582,24 +582,24 @@
         // nnint      - fract
         // nnint      - Length of exp
         // bejInteger - exp (includes sign for the exponent)
-        uint8_t wholeByteLen = (uint8_t)rdeGetNnint(params->sflv.value);
+        uint8_t wholeByteLen = (uint8_t)bejGetNnint(params->sflv.value);
         const uint8_t* wholeBejInt =
-            params->sflv.value + rdeGetNnintSize(params->sflv.value);
+            params->sflv.value + bejGetNnintSize(params->sflv.value);
         const uint8_t* fractZeroCountNnint = wholeBejInt + wholeByteLen;
         const uint8_t* fractNnint =
-            fractZeroCountNnint + rdeGetNnintSize(fractZeroCountNnint);
-        const uint8_t* lenExpNnint = fractNnint + rdeGetNnintSize(fractNnint);
-        const uint8_t* expBejInt = lenExpNnint + rdeGetNnintSize(lenExpNnint);
+            fractZeroCountNnint + bejGetNnintSize(fractZeroCountNnint);
+        const uint8_t* lenExpNnint = fractNnint + bejGetNnintSize(fractNnint);
+        const uint8_t* expBejInt = lenExpNnint + bejGetNnintSize(lenExpNnint);
 
         struct BejReal realValue;
         realValue.whole = bejGetIntegerValue(wholeBejInt, wholeByteLen);
-        realValue.zeroCount = rdeGetNnint(fractZeroCountNnint);
-        realValue.fract = rdeGetNnint(fractNnint);
-        realValue.expLen = (uint8_t)rdeGetNnint(lenExpNnint);
+        realValue.zeroCount = bejGetNnint(fractZeroCountNnint);
+        realValue.fract = bejGetNnint(fractNnint);
+        realValue.expLen = (uint8_t)bejGetNnint(lenExpNnint);
         if (realValue.expLen != 0)
         {
             realValue.exp = bejGetIntegerValue(
-                expBejInt, (uint8_t)rdeGetNnint(lenExpNnint));
+                expBejInt, (uint8_t)bejGetNnint(lenExpNnint));
         }
         RETURN_IF_CALLBACK_IERROR(params->decodedCallback->callbackReal,
                                   propName, &realValue,
diff --git a/src/meson.build b/src/meson.build
index 6651bda..c09268e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,7 +1,7 @@
 libbej_lib = library(
   'libbej',
   'bej_decoder_core.c',
-  'rde_common.c',
+  'bej_common.c',
   'bej_dictionary.c',
   'bej_decoder_json.cpp',
   include_directories : libbej_incs,
