Removed another case of recursion
Simplified shiftable buffer and replaced usage of size_t with uint32_t