Corrected base64 decoding.
corrected a bug causing a memory leak
Continued work on test case for base64 decoding