Move evaluation into moveOverAssignment
Abstracted replacement function
Assignment function now works recursively too.