better comments and slight fixes