Add tests for the variables API and fix bugs