Modify hooks, rhc module, and some common functions