Refactoring

A few improvements…