Move Ruby code to a separate file for the sake of versioning (#3)