Add a separator to View menu and cleanup code