ruby: change some things to modules