Enhancement: more ruby, less php