Refactors bdd to allow usage for Node, Adds global context resolver