IE compatibility and some other tweaks