Latest changes (don't remember if they were properly tested)