Finalized the code for manual hiding.