fix various serialization small issues and cleanup method calls
use more standard naming for templates and expressions modules in tests
add module name to serialization; escape quotes in strings
use function toString in serialization tests to make them easier to write and less prone to error