Standalone prepare

WIP: see tracking issue #132