Fixed accessor function immutable issue by utilizing copy.deepcopy and copy.copy methods when needed