Implemented Shared

The other PR needs to be merged first and then this one will be rebased.