Support in-memory initialization

Thanks to @jugglinmike See pr #16.