Finished functions for linking expressions to declarations. Need to test.