Some comments and style refactoring