Fix site root item hiding option
Cleanup code