I think that Gold is working for himself as he always is. Even when he is working with Emma or with Regina he is really working for himself. I think that he put the key in the jail before Emma came to speak to him about helping her because Mary had already found it before Emma went to speak to Gold. I don’t think Rumpel is a good guy at all though.