Remove tmp and improve ruby compatibility