removed comments because they're not accurate anymore; added functions to decode base64 as well