Added options hash to Resource constructor. Added handling of models option.