1.  clean up the teardown function
2. modularised the clenup operation
3. made sure all the creation - cleanup occur within protected section (
hspace mutex)
4. prepared for move to kref and global refcount approach