adding element serialization class

adding mocha tests for serializer
matrix functions moved from observer to seraializer