Revert "Changed the memory allocation method to be more efficient."

This reverts commit b57ebdf49206a18fd741bd07cf474956e6f3e466.
Removed an empty function and fixed a silly bug.