Getting rid of some deprecations and ruby warnings