Implement catalog register and deregister

Hi,

I need catalog register and deregister functions. So I tried to implement them.
Please check my patch.

Thanks.