Lazy operations with references

Added the ability to use references in conjunction with simple arithmetic operations.
Note that not all operations are yet supported.