Yvette's comments, bugs and refactoring