Adds some comments, cleaned up user interface class.