Only some minor changes done, such as adding some more "respond_to?".