Added BASE64. Tried to fix some annoying bugs