added some comments etc
added missing files