better comments and clean up