Made all changes requested by Kai (except for #8 and #10)