Add Ruby version.
Refactor a lot of initializing code into modules.