A lot of changes

Next time I promise to make several isolated commits.