Cross browser fixes; other cleanup