Fixes an error done in #108: use global scope methods instead of local

All function calls should use their exported, global methods. Otherwise, stubbing them won't be possible.