Merge pull request #296 from mageekguy/master

Improve call performance.
Merge pull request #297 from mageekguy/master

Improve call performance again.
Merge pull request #298 from mageekguy/master

Refactoring to avoid code duplication and optimize performance.
Remove bug in unit test.
Refactoring.