Added some comments, no known bugs