fix init arguments and valueOf for models.

1. init should take all arguments passed to the constructor
2. valueOf now respects ephemeral fields (not serialized)