Fix to loader
Added serialization example
Updates to tests