move exceptions into midwife.rb and add a few more comments