Fixed BaseModel bugs

Fixed a bug when setting multiple properties at once did not work
Fixed a bug where toJSON would return functions in the model’s
prototype chain