Update action function and documentation

* Split the helper function into two functions.
* Add better docstrings.
* Improve the documentation and explain about site user.