Added some comments and simplified usage.