Add a few comments and polish some front end stuff