Fixed schemas being referenced instead of cloned

I found the bug. The problem was that the newSchema function returned the direct reference to the original schema object. So with each request, the schema would get overwritten and following requests would keep previous properties. Now the newSchema function clones the original schema object so there should be no problem.