reapplied changes that have disappeared during the merges
added missing files, fixed small bugs