edit all files to satisfy ruby style ,change some method name and add comments