- Some small refactorings and fixes