Several improvements and refactorings Iteration 10.