Shared code for shared classes