CON-526: Fix for Share button and code cleanup