Multiple tweaks, refactorings