Small refactoring

- Improved comments and changed some formatting.