added more comments, cleaned up some stuff