split out initialise into new function
tidying
split the boolean to render to_memory, and the rendered output
inc version