Mike's changes (sent by Michal), mainly in section 3.1