Better code style + tracing improved