Some minor refactorings. Updated ideas seaction at the bottom