Refactoring, style changes