minor code cleanup based on Ruby Styleguide