Moved view removal handler registration to a better place