code cleanup, formatting of ruby output