Improved variable loading and storing