Call base64_cleanup in base64_decode to ensure memory is deallocated.
Cleanup and refactor.