Refactoring

Some small last changes.