Add some variable API edge case and tests
Add documentation in the readme