Added in some comments and minor changes