Major refactorings...