Refined the auto-increment function, and added proper documentation.
Added the license in the README.md