Add inline documentation of the API

Also revert "Add a byte order mark to the readme and license files"
(f7f48ac6dd1e48ccc0af3ddeeb9af257af66cf72).