Refactored using Base64 class