better comments and some styling