Thank you for a great code sample.
I think you deserve some acknowledgment for this great job.
Another important thing is a license, which is missing. Many developers may be confused whether it is legal to use this code in their commercial projects.
I suggest using MIT or BSD license.