Rename some stuff, improve comments, fix problem