Safari compatibility and misc. number parsing fixes.