Could you refactor to new ruby syntax? (and for every occurences)