Added some comments for usage, and minor alterations.