Recommits

Re-commiting things that by accident was deleted.
From PR #174  #175  #176