Improved comments, added test file.