Updates and refactorings