fixed saved functions, amongst other fixes...
merge