Fix permissions, further refactorings.