Renamed "output" function because it clashed with a parameter
Added a choice of output formats and of delimiter.

Output formats don't work yet
Writing class with context manager to handle b64 endings and stuff