Passing the Changes from Nicholay

Nicholay made some changes last night. These are the commits. Later I'll
take a closer look at it to figure out what needs to be done.