Added display, added comments, fixed some bugs