code clean up and commenting for assignment submission.