Updates gems.
Refactors Resource.