Feature/sharing

Fixes #1025