Clean up for clarity and ruby idioms