Move more ruby to the .rb file.