Added some comments, cleaned things