Fixed code to match styles and conventions.