Fixed compilation bug.  Removed redundancies and some comments.