Various improvements to the rails role