Overhauled type system; now able to correctly assign by reference.