Base 64 enconding and bug fixes.