Many updates for code clarity