Improved function documentation for sm:chown

Improved the function documentation and renamed a couple of variables