Better file organisation

- adding comments
- optimizing logging information