Refactoring init code to work in more cases.
Refactoring init code to work in more cases.

stormpath/stormpath-sdk-node,ck-lee/stormpath-sdk-node,peebles/stormpath-sdk-node,peebles/stormpath-sdk-node,stormpath/stormpath-sdk-node