Move shared vars into a separated object
WIP: Refactor API