[major] Added `shared.js` which is a base object that we build everything upon.

Reduces duplicated and pleases @swaagie