few syntax/style refactoring changes